9.1 Examining the Routing Table  
  9.1.1 The show ip route command  
One of the primary functions of a router is to determine the best path to a given destination. A router learns paths, also called routes, from an administrator's configuration or from other routers by way of routing protocols. Routers store this routing information in routing tables using on-board dynamic random access memory (DRAM). A routing table contains a list of the best available routes. Routers use the routing table to make packet forwarding decisions.

The show ip route command displays the contents of the IP routing table. This table contains entries for all known networks and subnetworks, as well as a code that indicates how that information was learned. The following are some additional commands that can be used with the show ip route command:

  • show ip route connected
  • show ip route network
  • show ip route rip
  • show ip route igrp
  • show ip route static

A routing table maps network prefixes to an outbound interface. When RTA receives a packet destined for 192.168.4.46, it looks for the prefix 192.168.4.0/24 in its table. RTA then forwards the packet out an interface (Ethernet0) based on the routing table entry. If RTA receives a packet destined for 10.3.21.5, it sends that packet out Serial 0/0.

The example routing table shows four routes for directly connected networks. These routes, labeled with a C, are available to directly connected networks. RTA drops any packet destined for a network that is not listed in the routing table. In order to forward to other destinations the routing table for RTA will have to include more routes. These new routes may be added using one of two methods:

  • Static routing – An administrator manually defines routes to one or more destination networks.
  • Dynamic routing – Routers follow rules defined by a routing protocol to exchange routing information and independently select the best path.

Administratively defined routes are said to be static because they do not change until a network administrator manually programs the changes. Routes learned from other routers are dynamic because they can change automatically as neighboring routers update each other with new information. Each method has fundamental advantages and disadvantages.

 

Lab Activity

Lab Exercise: Using Show IP Route to Examine Routing Tables

In this lab, students will set up an IP addressing scheme using class B networks.

 
 

Web Links

show ip route Command

http://www.cisco.com/en/US/products/sw/iosswrel
/ps1835/ products_command_reference_ chapter0
9186a008007ff84.html#1050101